#include <stdio.h>

int main(int argc, char const *argv[])
{
    char        a = 10 ;
    short       b = 10 ;
    int         c = 10 ;
    long        d = 10 ;
    float       e = 10.1 ;
    double      f = 10.2 ;

/****取变量的地址****/
    printf("&a = %p\n",&a);
    printf("&b = %p\n",&b);
    printf("&c = %p\n",&c);
    printf("&d = %p\n",&d);
    printf("&e = %p\n",&e);
    printf("&f = %p\n",&f);


/****直接访问****/
    printf("a = %d\n",a);
    printf("b = %d\n",b);
    printf("c = %d\n",c);
    printf("d = %d\n",d);
    printf("e = %f\n",e);
    printf("f = %f\n",f);

/****间接访问****/
    *(&a) = 20 ;
    *(&b) = 20 ;
    *(&c) = 20 ;
    *(&d) = 20 ;
    *(&e) = 20.1 ;
    *(&f) = 20.2 ;

    printf("a = %d\n",a);
    printf("b = %d\n",b);
    printf("c = %d\n",c);
    printf("d = %d\n",d);
    printf("e = %f\n",e);
    printf("f = %f\n",f);

    return 0;
}
